<template>
<div class="el-container">
  <el-form ref="form" class="login-container" style="text-align: left" label-position="left" :model="registerForm" label-width="90px">
    <h3>
      用户注册
    </h3>
    <el-row>
      <el-col :span="4">
        <span >用户名：*</span>
      </el-col>
      <el-col :span="20">
        <el-form-item label="">
          <el-input type="text" v-model="registerForm.username" placeholder="用户名" autocomplete="off" style="width: 400px"></el-input>
        </el-form-item>
      </el-col>
    </el-row>

    <el-row>
      <el-col :span="4">
        <span >密码：*</span>
      </el-col>
      <el-col :span="20">
        <el-form-item label="">
          <el-input type="password" v-model="registerForm.password" placeholder="验证码" autocomplete="off" style="width: 400px"></el-input>
        </el-form-item>
      </el-col>
    </el-row>

    <el-row>
      <el-col :span="4">
        <span >验证码：*</span>
      </el-col>
      <el-col :span="20">
        <el-form-item label="">
          <el-input type="password" v-model="registerForm.password" placeholder="验证码" autocomplete="off" style="width: 400px"></el-input>
        </el-form-item>
      </el-col>
    </el-row>




    <el-form-item>
      <el-button type="primary" @click="login">立即创建</el-button>
      <el-button @click="toRegister" style="">注册</el-button>
    </el-form-item>
  </el-form>
</div>
</template>

<script>
export default {
  name: "Register",
  data() {
    return {
      registerForm: {
        username: '',
        password: '',
      }
    }
  },
  methods: {
    login() {
      this.axios.post("http://localhost:8888/user/login",this.loginForm).then((res) => {
        let data=res
      })
    },
    toRegister(){
      this.$router.push("/Register")
    }
  }
}
</script>

<style scoped>

</style>